<?php
global $header;
$header['title'] = '配置 - 全站配置';

global $footer;

global $menu;
$menu['current'] = 'site.config';

global $message;

global $error;
global $config;

global $featureManager;
$featureManager->apply('com.yizin.platform.admin.header', $header);
$featureManager->apply('com.yizin.platform.admin.menu', $menu);
$featureManager->apply('com.yizin.platform.admin.footer', $footer);

?>
<?= $header['html'] ?>

<div class="ysi-container-C"><div class="ysi-container-CI">
<?php if ($message && is_array($error) && count($error) > 0) { ?><div class="ysi-message ysi-message-alert"><?= $message ?></div>
<?php } elseif ($message) { ?><div class="ysi-message ysi-message-info"><?= $message ?></div><?php } ?>

<div class="admin-heading">
<h2>整站系统配置</h2>
</div>

<form class="ysi-form ysi-form-w6" enctype="multipart/form-data" method="post" action="<?= REQUEST_BASE ?>admin/site/config/">

<fieldset>
  <legend>基本信息</legend>
  <div class="ysi-form-row">
    <div class="ysi-form-label"><label for="site_name">站点名称</label></div>
    <div class="ysi-form-field"><input class="ysi-form-text ysi-form-text-long" type="text" size="16" value="<?php if (isset($config['site_name'])) { echo htmlspecialchars($config['site_name']); } ?>" id="site_name" name="site_name" /><?php if (!isset($error['site_name'])) {?><span class="ysi-form-note"></span><?php } else { ?><span class="ysi-form-error"><?php echo $error['site_name'] ?></span><?php } ?></div>
    <div class="clear"></div>
  </div>
  <div class="ysi-form-row">
    <div class="ysi-form-label"><label for="copyright">版权信息</label></div>
    <div class="ysi-form-field"><input class="ysi-form-text ysi-form-text-long" type="text" size="16" value="<?php if (isset($config['copyright'])) { echo htmlspecialchars($config['copyright']); } ?>" id="copyright" name="copyright" /><?php if (!isset($error['copyright'])) {?><span class="ysi-form-note"></span><?php } else { ?><span class="ysi-form-error"><?php echo $error['copyright'] ?></span><?php } ?></div>
    <div class="clear"></div>
  </div>
  <div class="ysi-form-row">
    <div class="ysi-form-label"><label for="tech_support">技术支持</label></div>
    <div class="ysi-form-field"><input class="ysi-form-text ysi-form-text-long" type="text" size="16" value="<?php if (isset($config['tech_support'])) { echo htmlspecialchars($config['tech_support']); } ?>" id="tech_support" name="tech_support" /><?php if (!isset($error['tech_support'])) {?><span class="ysi-form-note"></span><?php } else { ?><span class="ysi-form-error"><?php echo $error['tech_support'] ?></span><?php } ?></div>
    <div class="clear"></div>
  </div>

  <div class="ysi-form-row ysi-form-indent">
    <div class="ysi-form-field">
      <input class="ysi-form-submit" type="submit" value="更新" />
    </div>
  </div>
</fieldset>

<div class="clear-1"></div>
</form>

</div></div>

<div class="ysi-container-L">
<?= $menu['html'] ?>
</div>
<?= $footer['html'] ?>
